/**
 Copyright will be fixed soon.
 Author: Hiroshi Ota.
 $Date: $
 $Revision: $
*/

#ifndef _PW_CON_IO_H_
#define _PW_CON_IO_H_

#ifndef _BRICKOS_
#include "ISimulatorControl.h"
#endif

// from conio.h
class PWConIO
{
public:
        static PWConIO* create();
#ifndef _BRICKOS_
        static PWConIO* create(ISimulatorControl* sc);
#endif

        // write bit-pattern for segments at position pos of LCD
        void cputc_native(char mask, int pos);
        // write HEX digit to position pos of LCD
        void cputc_hex(char c, int pos);
        // write HEX word to LCD
        void cputw(unsigned word);
        // write ASCII char to position pos of LCD
        void cputc(char c, int pos);
        // Write strings to LCD (Only first 5 chars)
        void cputs(char* s);
        // clear user portion of LCD
        void cls();

protected:
        PWConIO(void);
        ~PWConIO(void);
#ifndef _BRICKOS_
        PWConIO(ISimulatorControl* sc);
#endif
private:
        static PWConIO* instance;

#ifndef _BRICKOS_
		ISimulatorControl* simCon;
#endif
};

#endif // _PW_CON_IO_H_
